package com.ai.domain.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 小杰大人
 * @since 2025-02-23
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("courses")
@ApiModel(value = "Courses对象", description = "")
public class Course implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id")
    private Long id;

    @ApiModelProperty("课程分类id")
    @TableField("category_id")
    private Long categoryId;

    @ApiModelProperty("课程首页图id")
    @TableField("media_cover")
    private Long mediaCover;

    @ApiModelProperty("课程宣传视频id")
    @TableField("media_publish")
    private Long mediaPublish;

    @ApiModelProperty("教师id")
    @TableField("teacher_id")
    private Long teacherId;

    @ApiModelProperty("课程名")
    @TableField("name")
    private String name;

    @ApiModelProperty("课程当前人数")
    @TableField("course_cur")
    private Integer courseCur;

    @ApiModelProperty("课程最大人数")
    @TableField("course_max")
    private Integer courseMax;

    @ApiModelProperty("课程状态 1：正常，2：已满，3：下架")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("学习有效期 单位月")
    @TableField("validity_period")
    private Integer validityPeriod;

    @ApiModelProperty("课程描述")
    @TableField("description")
    private String description;

    @ApiModelProperty("课程备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty("课程学期")
    @TableField("semester")
    private String semester;

    @ApiModelProperty("课程标签")
    @TableField("tags")
    private String tags;

    @ApiModelProperty("创建时间")
    @TableField(value = "create_time" , fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(value = "update_time" , fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("创建人")
    @TableField(value = "create_user" , fill = FieldFill.INSERT)
    private Long createUser;

    @ApiModelProperty("修改人")
    @TableField(value = "update_user" , fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;

    @ApiModelProperty("课程点赞数")
    @TableField("likes")
    private Integer likes;

    @ApiModelProperty("课程收藏数")
    @TableField("favorite")
    private Integer favorite;

    @ApiModelProperty("课程版本号")
    @TableField("version")
    private String version;

    @ApiModelProperty("课程销量")
    @TableField("sales")
    private Long sales;

    @ApiModelProperty("是否删除 0:否 1:是")
    @TableField("deleted")
    private Byte deleted;


}
